#ifndef GLWIN32RENDERWINDOW_H
#define GLWIN32RENDERWINDOW_H

#include "Graphics/OpenGL/GLPrerequisites.h"
#include "Graphics/IRenderWindow.h"
#include "Graphics/OpenGL/Win32/GLWin32Context.h"
#include "OS/OpenGL/GLWin32WindowManager.h"

namespace tyro
{
	namespace Graphics
	{
		class GLWin32RenderWindow : public IRenderWindow
		{
		public:
			GLWin32RenderWindow(OS::GLWin32WindowManager &windowManager);
			~GLWin32RenderWindow();

			void Create(const char* const name, unsigned int width, unsigned int height, bool IsFullScreen);
			void SetFullscreen(bool IsFullscreen, unsigned int width, unsigned int height);
			
			bool IsFullscreen(void) const;
			void SetHidden(bool isHidden);
			

			void Resize(UINT32 width, UINT32 height);

			HWND GetWindowHandle() const { return windowHandle; }
			HDC  GetDeviceContext() const { return deviceContext; }
			void GetCustomAttribute(const char* const name, void* data);

			void Release(void);

			void swapBuffers();





		protected:
			
			
			HWND	windowHandle;
			HDC		deviceContext;
			HGLRC	renderContext;
			char*	deviceName;

			bool	isHidden;
			bool	isExternal;

			GLWin32Context *context;

			DWORD	windowedStyle;
			DWORD	fullscreenStyle;

			OS::GLWin32WindowManager &windowManager;

		private:
		};
	}
}
#endif